#include <stdio.h>
int main()
{
	int month_tab[2][13]={{0,31,28,31,30,31,30,31,31,30,31,30,31},{0,31,29,31,30,31,30,31,31,30,31,30,31}};
	int yearday,month,day;
	int yerday,leap,i;
	printf("\n Enter year_month_day:");
	scanf("%d %d %d",&yearday,&month,&day);
	leap=((yearday%4==0)&&(yearday%100!=0)||(yearday%400==0));
     yearday=day;
	for(i=1;i<month;i++); 
	   yearday+=month_tab[leap][i];
	printf("yearday=%d",yearday);
	return 0;
}
